import 'package:flutter/material.dart';
class IconContainer extends StatelessWidget{
  //可选参数
  double size=32.0;
  Color color = Colors.red;
  Color BoxColor = Colors.red;
  //必填参数
  IconData icon;
  IconContainer(this.icon,{this.color,this.size,this.BoxColor});

  Widget build(BuildContext context){
    return Container(
      height: 100,
      width: 100,
      
      decoration: BoxDecoration(
        color: this.BoxColor,
        border: Border.all(
          width: 1,
          color: Colors.black87
        )
      ),
      child: Center(
        child: Icon(this.icon,size: this.size,color: this.color,),
      ),
    );
  }
}